﻿#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>


int Isyear(int y)
{
	if ((y % 4 == 0 && y % 100 != 0) || y % 400 == 0)
	{
		return 1;
	}
	return 0;
}
int main()
{
	// 请在此输入您的代码
	int count = 0;
	int y = 2000;
	int m = 1;
	int d = 1;
	for (y = 2000; y < 2000000; d++)
	{
		
		if (m == 12 && d == 32)
		{
			y++;
			m = 1;
			d = 1;
		}
		if ((m == 1 || m == 3 || m == 5 || m == 7 || m == 8 || m == 10 || m == 12) && d == 32)
		{
			m++;
			d = 1;
		}
		if ((m == 4 || m == 6 || m == 9 || m == 11) && d == 31)
		{
			m++;
			d = 1;
		}
		if (Isyear(y) == 1 && m == 2 && d == 30)
		{
			m++;
			d = 1;
		}
		if (Isyear(y) == 0 && m == 2 && d == 29)
		{
			m++;
			d = 1;
		}
		if (y % m == 0 && y % d == 0)
		{
			count++;
		}


	}
	printf("%d", count);


	return 0;
}